#!/usr/bin/env bash
dt="`date -d "$d  0 days ago "  "+%Y-%m-%d"`"
mysql -ureadonly -preadonly -h192.168.0.50<<EOF
use jiayou;
select from_unixtime(unix_timestamp(),'%Y-%m-%d'),coupon_statue,IFNULL(sum(discount_amount),0)
from coupon_info_report group by coupon_statue;
EOF